const app = getApp();
Page({
	data: {
	},
	onLoad() {
		let that = this;
		// 获取用户信息
		wx.getSetting({
			success: res => {
				if (!res.authSetting['scope.userInfo']) {
					wx.redirectTo({
						url: '/pages/guide/guide'
					});
				}
			}
		});
	},
	showModal(e) {
		this.setData({
			modalName: e.currentTarget.dataset.target
		});
	},
	hideModal(e) {
		this.setData({
			modalName: null,
			pos: 'fixed'
		});
	},
	inputFocus(e) {
		console.log(e, '键盘弹起');
		var inputHeight = 0;
		if (e.detail.height) {
			inputHeight = e.detail.height;
		}
		this.setData({
			height: inputHeight,
			pos: 'static'
		});
	},
	bindKeyInput(e) {
		this.setData({
			inputValue: e.detail.value
		});
	},
});